﻿<%@ page language="java" pageEncoding="UTF-8"
	errorPage="/ui/defaultException.jsp"%>
<%@include file="/ui/tags.jsp"%>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %> 
<%@ page import="org.springframework.web.context.WebApplicationContext" %>
<%@ page import="com.suoluo.zenadmin.service.home.HomeService" %>
<%@ page import="java.util.List" %>
<%@ page import="com.suoluo.zenadmin.vo.home.HomeCategoryVO" %>
<%
	WebApplicationContext  context = WebApplicationContextUtils.getRequiredWebApplicationContext(session.getServletContext());
	HomeService homeService = (HomeService)context.getBean("homeService");
	List<HomeCategoryVO> categoryList = homeService.findAllHomeData();
	pageContext.setAttribute("categoryList",categoryList);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Zen先生旅行了--禅境旅行</title>
    <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <%@include file="/ui/portal/commonjscss.jsp"%>
</head>
<body>
    <div class="page">
        <div class="main-nofound">
            <div class="nofound-title">
                Zen先生 出去旅行啦
                <br />
                到这些地方逛逛或许能够遇见他
            </div>
            <div class="nofound-menu">
                <div class="nofound-menu-item index">
                    <a href="${cpath}/">首页</a></div>
                <div class="nofound-menu-item fengge">
                    <a href="${cpath}/classify">风格偏好</a></div>
                <div class="nofound-menu-item mudi">
                    <a href="${cpath}/destination">目的地探索</a></div>
                <div class="nofound-menu-item jingxuan">
                    <a href="${cpath}/hotel">酒店精选</a></div>
            </div>
            <div class="nofound-commend">
            	<c:forEach var="category" items="${categoryList }">
            		<c:forEach var="item" items="${category.homeItems }">
            			<c:choose>
                		<c:when test="${category.featureCategoryId == -1 }">
                			<c:set var="linkUrl" scope="page" value="${cpath}/classify/news/${item.linkId}"/>
                		</c:when>
                		<c:when test="${category.featureCategoryId == -2 }">
                			<c:set var="linkUrl" scope="page" value="${cpath}/destination/${item.linkId}"/>
                		</c:when>
                		<c:when test="${category.featureCategoryId == -3 }">
                			<c:set var="linkUrl" scope="page" value="${cpath}/hotel/${item.linkId}"/>
                		</c:when>
                		<c:otherwise>
                			<c:set var="linkUrl" scope="page" value="${cpath}/destination/${item.destId}/item/${item.linkId}"/>
                		</c:otherwise>
                		</c:choose>
            			<div class="nofound-commend-item" img-resize='true'>
            				<a href="${linkUrl }">
                    		<img src="${image_domain }${item.miniImg}" />
                    		</a>
                		</div>
            		</c:forEach>
            	</c:forEach>
            </div>
        </div>
    </div>
    <div id="back-top">
		<a href="javascript:void(0);">&nbsp;</a>
	</div>
</body>
</html>
